import Layout from '@/layout/index.vue';
import * as i18n from '@/utils';
let presets = {
	path: '/presets',
	component: Layout,
	name: '模板管理',
	meta: {
		title: i18n.t('router.templateManage'),
		icon: 'dashboard',
	  	isPermiss:'/management/template'
	},
	children: [
		{
			path: '/presets/info',
			component: () => import('@/views/presets/info/index.vue'),
			name: '模板信息',
			meta: { title: i18n.t('presets.info.templateInfo') },
	  		isPermiss:'/management/template.template/getList'
		},
		{
			hidden: true,
			path: '/presets/info/distribution',
			component: () => import('@/views/presets/info/distribution/index.vue'),
			name: '模板布局',
			meta: { title: i18n.t('router.templateLayout'),induce:'/presets/info' },
	  		isPermiss:'/management/template.template_layout/getList'
		},
		{
			path: '/presets/view',
			component: () => import('@/views/presets/view/index.vue'),
			name: '模板视图',
			meta: { title: i18n.t('help.help.templateView') },
	  		isPermiss:'/management/template.template_view/getList'
		},
		{
			hidden: true,
			path: '/presets/view/details/edit',
			component: () => import('@/views/presets/view/details/edit.vue'),
			name: '编辑视图预览',
			meta: { title: i18n.t('help.help.editView') },
			isPermiss:'/management/template.template_view/getFind'
		},
		{
			hidden: true,
			path: '/presets/view/details/preview',
			component: () => import('@/views/presets/view/details/preview.vue'),
			name: '模板视图预览',
			meta: { title: i18n.t('help.help.viewPreview') },
	  		isPermiss:'/management/template.template_view/getFind'
		},
		{
			path: '/presets/assembly',
			component: () => import('@/views/presets/assembly/index.vue'),
			name: '模板组件',
			meta: { title: i18n.t('help.help.component') },
	  		isPermiss:'/management/template.template_plugins/getList'
		},
		{
			path: '/presets/assignView',
			component: () => import('@/views/presets/assignView/index.vue'),
			name: '分配视图',
			meta: { title: i18n.t('router.assignView') },
	  		isPermiss:'/management/machine.machine_view/getList'
		},{
			hidden: true,
			path: '/presets/assignView/assignDevices',
			component: () => import('@/views/presets/assignView/assignDevices.vue'),
			name: '分配视图给设备',
			meta: { title: i18n.t('router.assignViewTo'),requiresAuth: false },
			isPermiss:'/management/machine.machine_view/add'
		},
		{
			hidden: true,
			path: '/presets/assembly/add_info',
			component: () => import('@/views/presets/assembly/add_info/index.vue'),
			name: '添加组件',
			meta: { title: i18n.t('presets.assembly.add'),induce:'/presets/assembly' },
			isPermiss:'/management/template.template_plugins/add'
		},
		{
			hidden: true,
			path: '/presets/assembly/details_info',
			component: () => import('@/views/presets/assembly/details_info/index.vue'),
			name: '组件详情',
			meta: { title: i18n.t('presets.assembly.details'),induce:'/presets/assembly' },
			isPermiss:'/management/template.template_plugins/update'
		}
	]
}

export default presets;